var proinfo = $.cookie('newstr');
var objinfo = JSON.parse(proinfo);
console.log(objinfo);//{ proname: "家", price: "565.0", qty: "500", num: 5,"imgname":jsonobj.imgname}

$('#table-info').prepend('<tr class="line-bot">'+
		'<td width="599">'+
		'<p class="o-goods-info clearfix  ">'+
			'<a href="#" class="fl"><span>'+
		'<img src="upload/product_img/'+objinfo.imgname+'" alt=""></span></a>'+
			'<span class="fl tit mt10">'+objinfo.proname+'</span>'+
		'</p>'+
	'</td>'+
	'<td width="148">'+objinfo.price+'元*'+objinfo.num+'</td>'+
	'<td width="128">有货</td>'+
	'<td width="177"><span class="orange">'+objinfo.price * objinfo.num+'元</span></td>'+
'</tr>');
$('#payprice').html('￥'+objinfo.price * objinfo.num);

$('#submit').click(function(){
	var username = $('#username').val();
	var userhpone = $('#userhpone').val();
	var useraddress = $('#useraddress').val();
	var userdailaddress = $('#userdailaddress').val();
	var userzq = $('#userzq').val();
	
	$('#addressinfo').prepend('<div class="consignee-block check-box radius5" id="a-box">'+
			'<em></em>'+
			'<p class="fs14 lh40 clearfix">'+
				'<span class="fl darkgray"><i class="iconfont fs24">&#xe60e;</i>'+username+'</span>'+
				'<a href="javascript:" class="fr green edit"><i class="iconfont fs24 green">&#xe60f;</i>编辑</a>'+
			'</p>'+
			'<p class="fs14 darkgray lh40"><i class="iconfont fs24">&#xe60c;</i>'+
			''+userhpone+''+
				'<p class="fs14 darkgray lh30 clearfix">'+
					'<i class="fl iconfont fs24">&#xe610;</i><span class="fl address">'+useraddress+userdailaddress+userzq+'</span>'+
				'</p>'+
		'</div>');
});
$('#cancle').click(function(){
	$('.useraddressform').find('input').val('');
});
var dingdannumber = new Date().getTime();
var adr = {"address":""+$('#useraddress').val()+$('#userdailaddress').val()+"","zq":""+$('#userzq').val()+"","username":""+$('#username').val()+"","userhpone":""+$('#userhpone').val()+"","proname":""+objinfo.proname+"","pronum":""+objinfo.num+"","proprice":""+objinfo.price * objinfo.num+"","ddnumber":""+dingdannumber+""};
var stradr = JSON.stringify(adr);

$('#gopay').click(function(){
	$.cookie("adr",stradr);
	window.location.href = '/onlineShopping001/fukuan.jsp';
});
/*$('#fuwutime').click(function(){
	if('check-on' == $('#timeadress').find('a').attr('class')){
		var fuwutime = $('#timeadress').find('a').find('span').text();
		alert(fuwutime);
	}
});*/


/*$('#a-box').click(function(){
	$(this).addClass('check-on');
});*/